package com.gilight.base.service;

import com.gilight.base.dto.RoleDto;
import com.gilight.base.dto.SysUserRoleDto;
import com.gilight.base.model.SysRole;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface SysRoleService {


    PageInfo findList(RoleDto roleDto);

    List<SysRole> all();

    void add(SysRole role);

    void edit(SysRole role);

    void delete(Long id);

    void updateStatus(Long id, Integer status);

    List<Map<String, Object>> findAllPermission(Long roleId,String appKey);
    List<Map<String, Object>> findAllButtonPermission(Long roleId);

    List<Map<String, Object>> allPermission(String appKey);

    void assign(Long id, List<Long> permissionIdList,String appKey);
    void assignButton(Long id, List<Long> permissionIdList,Long menuId);
    Long selectDefaultRoleByUserId(Long userId);
    List<SysRole> selectByUserId(Long roleId);

    void assignRoleDataRule(Long id, Long permissionId,String dataRuleIds);

    List<Map<String, Object>> getUserListByRoleId(Map<String, Object> map);

    void deleteRole(Long roleId);

    void addUserRoleBatch(Map<String, Object> mapParam);

    void deleteUserRole(Long roleId, Long userId);

    List<SysRole> findRoleList();
}
